// IconSelection 组件样式 - 适配 Taro 多端框架

.icon-selection {
  width: 100%;
  box-sizing: border-box;

  &__title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding: 0 16px;
  }

  &__grid {
    display: flex;
    flex-wrap: wrap;
    // padding: 0 10px;
  }

  &__item {
    width: 18%; // 4 列
    box-sizing: border-box;
    padding: 3px;
    margin: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    // 内容区域
    border-radius: 12px;
    background: #f5f5f5;
    transition: all 0.2s ease;

    &:active {
      transform: scale(0.95);
      background: #e8e8e8;
    }

    &--active {
      background: #e7f4ff;
      border: 2px solid #1890ff;

      .icon-selection__label {
        color: #1890ff;
        font-weight: 600;
      }
    }
  }

  &__icon {
    width: 28px;
    height: 28px;
    // margin: 8px 0;
  }

  &__label {
    font-size: 12px;
    color: #666;
    text-align: center;
    // margin-bottom: 8px;
  }
}

// 响应式适配（小屏幕）
@media screen and (max-width: 375px) {
  .icon-selection {
    &__grid {
      padding: 0 8px;
    }

    &__item {
      width: 33.33%; // 3 列
      padding: 5px;
    }

    &__icon {
      width: 40px;
      height: 40px;
    }

    &__label {
      font-size: 20px;
    }
  }
}

// 响应式适配（大屏幕）
@media screen and (min-width: 768px) {
  .icon-selection {
    &__grid {
      padding: 0 12px;
    }

    &__item {
      width: 20%; // 5 列
      padding: 8px;
    }

    &__icon {
      width: 56px;
      height: 56px;
    }

    &__label {
      font-size: 24px;
    }
  }
}
